import request from '@/utils/request'

// 查询库房信息列表
export function listMdWhInfo(query) {
  return request({
    url: '/meter/mdWhInfo/list',
    method: 'get',
    params: query
  })
}

// 查询库房信息详细
export function getMdWhInfo(whId) {
  return request({
    url: '/meter/mdWhInfo/' + whId,
    method: 'get'
  })
}

// 新增库房信息
export function addMdWhInfo(data) {
  return request({
    url: '/meter/mdWhInfo',
    method: 'post',
    data: data
  })
}

// 修改库房信息
export function updateMdWhInfo(data) {
  return request({
    url: '/meter/mdWhInfo',
    method: 'put',
    data: data
  })
}

// 删除库房信息
export function delMdWhInfo(whId) {
  return request({
    url: '/meter/mdWhInfo/' + whId,
    method: 'delete'
  })
}

//查询库房下拉框
export function selectMdWhInfo(query){
  return request({
    url: '/meter/mdWhInfo/mdWhInfoOptions',
    method: 'get',
    params: query
  })
}

//查询库区下拉框
export function selectMdStorageAreaInfo(query){
  return request({
    url: '/meter/mdWhAreaInfo/mdWhAreaInfoOptions',
    method: 'get',
    params: query
  })
}

//查询存放区下拉框
export function selectMdSaInfo(query){
  return request({
    url: 'meter/mdStorageAreaInfo/mdStorageAreaInfoOptions',
    method: 'get',
    params: query
  })
}

//查询储位下拉框
export function selectStorageLocation(query){
  return request({
    url: 'meter/mdStockPosInfo/mdStockPosInfoOptions',
    method: 'get',
    params: query
  })
}